package com.zhupanlin.zhyl.user.utils;

import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * @author zhupanlin
 * @version 1.0
 * @description: TODO
 * @date 2024/12/1 15:06
 */
@Component
public class ConstantWXPropertiesUtils implements InitializingBean {

    @Value("${wx.open.app_id}")
    private String appId;

    @Value("${wx.open.app_secret}")
    private String appSecret;

    @Value("${wx.open.redirect_url}")
    private String redirectUrl;

    @Value("${zhyl.baseUrl}")
    private String zhylBaseUrl;

    public static String APP_ID;
    public static String APP_SECRET;
    public static String REDIRECT_URL;

    public static String ZHYL_BASE_URL;

    /**
     * @throws Exception
     */
    @Override
    public void afterPropertiesSet() throws Exception {

        APP_ID = appId;
        APP_SECRET = appSecret;
        REDIRECT_URL = redirectUrl;
        ZHYL_BASE_URL = zhylBaseUrl;

    }
}
